home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / scrtst / frmutil.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-24  |  3.7 KB  |  133 lines

  1. VERSION 2.00
  2. Begin Form frmUtility 
  3.    ClientHeight    =   480
  4.    ClientLeft      =   2415
  5.    ClientTop       =   7650
  6.    ClientWidth     =   1245
  7.    ControlBox      =   0   'False
  8.    Height          =   1170
  9.    Left            =   2355
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   480
  14.    ScaleWidth      =   1245
  15.    Top             =   7020
  16.    Width           =   1365
  17.    Begin PictureBox picCapture 
  18.       AutoRedraw      =   -1  'True
  19.       Height          =   495
  20.       Left            =   480
  21.       ScaleHeight     =   465
  22.       ScaleWidth      =   465
  23.       TabIndex        =   0
  24.       Top             =   0
  25.       Width           =   495
  26.    End
  27.    Begin CommonDialog dlgUtility 
  28.       Left            =   0
  29.       Top             =   0
  30.    End
  31.    Begin Menu mnuPopup 
  32.       Caption         =   "PopUp"
  33.       Begin Menu mnuPType 
  34.          Caption         =   "&1 VGA 640x480"
  35.          Index           =   0
  36.       End
  37.       Begin Menu mnuPType 
  38.          Caption         =   "&2 Super VGA 800x600"
  39.          Index           =   1
  40.       End
  41.       Begin Menu mnuPType 
  42.          Caption         =   "&3 1024x768"
  43.          Index           =   2
  44.       End
  45.       Begin Menu mnuPSep1 
  46.          Caption         =   "-"
  47.       End
  48.       Begin Menu mnuPColors 
  49.          Caption         =   "&Background Color..."
  50.       End
  51.       Begin Menu mnuPSep2 
  52.          Caption         =   "-"
  53.       End
  54.       Begin Menu mnuPGrab 
  55.          Caption         =   "&Grab Screen"
  56.       End
  57.       Begin Menu mnuPDest 
  58.          Caption         =   "Capture &Destination"
  59.          Begin Menu mnuPDDestOpt 
  60.             Caption         =   "&Clipboard"
  61.             Checked         =   -1  'True
  62.             Index           =   0
  63.          End
  64.          Begin Menu mnuPDDestOpt 
  65.             Caption         =   "BMP &File"
  66.             Index           =   1
  67.          End
  68.       End
  69.       Begin Menu mnuPSep3 
  70.          Caption         =   "-"
  71.       End
  72.       Begin Menu mnuPSendBack 
  73.          Caption         =   "&Send to Back"
  74.       End
  75.       Begin Menu mnuPMinimize 
  76.          Caption         =   "Mi&nimize"
  77.       End
  78.       Begin Menu mnuPSep4 
  79.          Caption         =   "-"
  80.       End
  81.       Begin Menu mnuPAbout 
  82.          Caption         =   "&About Screen Tester..."
  83.       End
  84.       Begin Menu mnuPClose 
  85.          Caption         =   "&Close"
  86.       End
  87.    End
  88. Option Explicit
  89. ' This form is used to hold the popup menu and
  90. ' common dialog control.  It should never be shown
  91. Sub Form_Load ()
  92.   ' Since VB doesn't allow an Alt+F4 menu accelerator hotkey,
  93.   ' it's faked by using a Tab character and code in frmMain's
  94.   ' KeyDown event.
  95.   mnuPClose.Caption = mnuPClose.Caption & Chr$(8) & "Alt+F4"
  96.   SetUpForm Me, "Utility"
  97. End Sub
  98. Sub mnuPAbout_Click ()
  99.   frmAbout.Show MODAL
  100. End Sub
  101. Sub mnuPClose_Click ()
  102.   ExitProgram
  103. End Sub
  104. Sub mnuPColors_Click ()
  105.   ' Invoke Common Colors Dialog and set main form's background color
  106.   Const CC_RGBINIT = &H1&
  107.   dlgUtility.Flags = CC_RGBINIT
  108.   dlgUtility.Color = frmMain.BackColor
  109.   dlgUtility.Action = 3
  110.   frmMain.BackColor = dlgUtility.Color
  111.   SaveColor (dlgUtility.Color)
  112. End Sub
  113. Sub mnuPDDestOpt_Click (Index As Integer)
  114.   SetDestCheck Index
  115. End Sub
  116. Sub mnuPGrab_Click ()
  117.   ' Capture simulated screen area
  118.   SendFormToBack frmMain
  119.   DoEvents
  120.   GrabScreen
  121. End Sub
  122. Sub mnuPMinimize_Click ()
  123.   ' Minimize application
  124.   SaveScreenPosition
  125.   frmMain.WindowState = MINIMIZED
  126. End Sub
  127. Sub mnuPSendBack_Click ()
  128.   SendFormToBack frmMain
  129. End Sub
  130. Sub mnuPType_Click (Index As Integer)
  131.   SetStyle frmMain, Index
  132. End Sub
  133.